object Unity_EmirListesiSiparisAyrintiF: TUnity_EmirListesiSiparisAyrintiF
  Left = 194
  Top = 160
  Width = 851
  Height = 459
  Caption = 'Unity EmirListesi Sipari'#351' Ayr'#305'nt'#305
  Color = clBtnFace
  Font.Charset = TURKISH_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Arial'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  Position = poMainFormCenter
  OnClose = FormClose
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 14
  object wwDBGrid1: TwwDBGrid
    Left = 0
    Top = 0
    Width = 843
    Height = 391
    DisableThemes = False
    Selected.Strings = (
      'siparisno'#9'7'#9'Sipari'#351' No'#9'F'
      'tarih'#9'10'#9'Tarih'#9'F'
      'stokkodu'#9'20'#9'Stok Kodu'#9'F'
      'miktar'#9'5'#9'Miktar'#9'F'
      'firmaadi'#9'40'#9'Firma Ad'#305#9'F'
      'aciklama'#9'200'#9'A'#231#305'klama'#9'F')
    IniAttributes.Delimiter = ';;'
    TitleColor = clBtnFace
    FixedCols = 0
    ShowHorzScrollBar = True
    Align = alClient
    DataSource = SecilenSiparisListesiS
    KeyOptions = [dgEnterToTab]
    Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgWordWrap]
    PopupMenu = PopupMenu1
    TabOrder = 0
    TitleAlignment = taLeftJustify
    TitleFont.Charset = TURKISH_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Arial'
    TitleFont.Style = []
    TitleLines = 1
    TitleButtons = False
    UseTFields = False
  end
  object Panel1: TPanel
    Left = 0
    Top = 391
    Width = 843
    Height = 41
    Align = alBottom
    BevelOuter = bvNone
    TabOrder = 1
    DesignSize = (
      843
      41)
    object BitBtn1: TBitBtn
      Left = 743
      Top = 8
      Width = 91
      Height = 25
      Anchors = [akRight]
      Caption = 'Kapat'
      TabOrder = 0
      OnClick = BitBtn1Click
    end
  end
  object Memo1: TMemo
    Left = 104
    Top = 136
    Width = 625
    Height = 209
    Lines.Strings = (
      'Memo1')
    TabOrder = 2
    Visible = False
  end
  object SecilenSiparisListesi: TADOQuery
    Connection = dm.connect
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    Parameters = <>
    SQL.Strings = (
      
        'select id,aktarilanuremrino=(select aktarilanuremrino from unity' +
        '_emirlistesi where unity_emirlistesi.siparisharid=unity_siparish' +
        'ar.id),siparisno=(select siparisno from unity_siparis_2006 where' +
        ' unity_siparis_2006.id=unity_siparishar_2006.siparisid),siparisn' +
        'o=(select siparisno from unity_siparis_2006 where unity_siparis_' +
        '2006.id=unity_siparishar_2006.siparisid), tarih=(select tarih fr' +
        'om unity_siparis_2006 where unity_siparis_2006.id=unity_siparish' +
        'ar_2006.siparisid),'
      
        ' firmaadi=(select firmaadi from cari where cari.carikod=(select ' +
        'carikod from unity_siparis_2006 where unity_siparis_2006.id=unit' +
        'y_siparishar_2006.siparisid)), aciklama=(select aciklama from un' +
        'ity_siparis_2006 where unity_siparis_2006.id=unity_siparishar_20' +
        '06.siparisid),'
      
        'stokkodu=(select stokkodu from stok where stok.stokkod=unity_sip' +
        'arishar_2006.stokkod),miktar from unity_siparishar_2006 ')
    Left = 296
    Top = 8
  end
  object SecilenSiparisListesiS: TDataSource
    DataSet = SecilenSiparisListesi
    Left = 264
    Top = 8
  end
  object PopupMenu1: TPopupMenu
    Left = 144
    Top = 128
    object retimListesindenGeriAl1: TMenuItem
      Caption = 'Se'#231'ilen Sipari'#351'i Geri Al'
      OnClick = retimListesindenGeriAl1Click
    end
    object TumunuGeriAl1: TMenuItem
      Caption = 'T'#252'm'#252'n'#252' Geri Al'
      OnClick = TumunuGeriAl1Click
    end
    object SipariiA1: TMenuItem
      Caption = 'Sipari'#351'i A'#231
      OnClick = SipariiA1Click
    end
  end
  object UnityEmirlistesi_HareketSil: TADOQuery
    Connection = dm.connect
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'siparisharid3'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end
      item
        Name = 'siparisharid1'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end
      item
        Name = 'siparisharid2'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      'declare @Miktar int'
      'Set @Miktar=(Select Sum(Adet) from unity_emirlistesi '
      'where siparisharid=:siparisharid3 and aktarilanuremrino is null)'
      ''
      'delete from unity_emirlistesi '
      'where siparisharid=:siparisharid1 and aktarilanuremrino is null'
      ''
      ''
      'update unity_siparishar_2006 '
      'set durum='#39'1'#39',verilenmiktar=verilenmiktar-@Miktar'
      'where id=:siparisharid2 ')
    Left = 296
    Top = 48
  end
  object SiparisHar: TADOQuery
    Connection = dm.connect
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'siparisid'
        Attributes = [paSigned, paNullable]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    Prepared = True
    SQL.Strings = (
      'select * from unity_siparishar_2006'
      'where siparisid=:siparisid')
    Left = 296
    Top = 112
  end
  object Siparis: TADOQuery
    Connection = dm.connect
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'id'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    Prepared = True
    SQL.Strings = (
      'select * from unity_siparis_2006'
      'where id=:id')
    Left = 296
    Top = 152
  end
end
